package com.sunlands.zlcx.usercenter.domain.count;

import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Date;

/**
 * @author gaoyanfeng
 * description: 近7日学习汇总
 */
@Data
@ApiModel(value = "近7日学习汇总")
@NoArgsConstructor
public class SumUser7DaysLearnDO implements Serializable {
    private static final long serialVersionUID = 896128703827138975L;
    private Long userId;
    private Long targetId;
    private Integer type;
    private Date countTime;
    private Long sumMinutes;
    private String yearMonthDay;

    public SumUser7DaysLearnDO(Long userId, Integer targetId, Integer type, Timestamp countTime, BigDecimal sumMinutes, String yearMonthDay) {
        this.userId = userId;
        this.type = type;
        this.sumMinutes = Long.valueOf(sumMinutes.toString());
        this.yearMonthDay = yearMonthDay;
        this.targetId = targetId.longValue();
        this.countTime = new Date(countTime.getTime());
    }
}
